All contributions will be done on Github, including PR, review process etc.
Please file the issue in the github projects above. Please ensure your issue has not been reported earlier.
The functional TDK follows semantic versioning, patch versions for bug fixes, minor versions for new features, major versions for non-backwards compatible updates.
We provide a base-command.js for inheritance to implement your own command for browser test. To implement a command for browser usage, you need to
Method | Purpose | Arguments |
---|---|---|
do(magellanSelector) | Called by base test if element exists and is visible, you can do you own things in this method. | magellanSelector is the selector you should use which is generated by nightwatch-extra |
command(…, callback) | The command signature which user will use in their test | Parameter amount can be arbitary with an optional callback which will be called when the command successfully finishes. |
"custom_commands_path": [
"./node_modules/testarmada-nightwatch-extra/lib/commands",
"./node_modules/testarmada-nightwatch-extra/lib/commands/mobile",
"./lib/custom_commands"
],
We provide a base-assertion.js for inheritance to implement your own assertion for browser test. To implement an assertion for browser test, you need to
Method | Purpose | Arguments |
---|---|---|
do(magellanSelector) | Called by base test if element exists and is visible, you can do you own things in this method. | magellanSelector is the selector you should use which is generated by nightwatch-extra |
assert(actual, expected) | Called by base assertion if element exists and is visible, you can do you own assertion in this method. | actual is the actual value returned by injectedJsCommand() method, expected is the expected value passed in command() method |
command(selector, expected, …, callback) | The command signature which user will use in their test | Parameter amount can be arbitary with a selector, an expected value and an optional callback which will be called when the assertion successfully finishes. |
"custom_assertions_path": [
"./node_modules/testarmada-nightwatch-extra/lib/assertions",
"./node_modules/testarmada-nightwatch-extra/lib/assertions/mobile",
"./lib/custom_assertions"
],
A reporter must implement following methods.
Method | Purpose |
---|---|
initialize() | initialize current reporter instance |
listenTo(testRun, test, source) | listen to magellan’s test run |
_handleMessage(testRun, test, msg) | will be called when magellan emits certain events |
flush() | will be called when magellan finishes |
Please note: _handleMessage() will be called per test. Please handle the error properly if it happens in one of the _handleMessage() so all your following _handleMessage() and flush() don’t error out.
To enable multiple reporters, simply add them in magellan.json
"reporters": [
"testarmada-magellan-xunit-reporter",
"testarmada-magellan-dev-reporter"
],